package gewu.suleju.exception;

import gewu.suleju.model.vo.Result;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class GlobalExceptioHander {
    //针对某个异常进行单独的处理 - 必须要继承RuntimeException
    @ResponseBody
    @ExceptionHandler(FormTokenException.class)
    public Result hello(){
        return new Result("500","sorry,您已经提交过了，不能够重复提交!");
    }
}
